<template>
<!--    轮播图组件-->
    <el-carousel height="270px" indicator-position="outside">
        <el-carousel-item v-for="(item,index) in sliders" :key="item.id">
            <img class="small" :src="sliders[index].pic">
        </el-carousel-item>
    </el-carousel>

</template>

<script>
export default {
    name: 'carousel',
    props: {
        sliders:{
            type:Array,
            default(){
                return []
            }
        }
    },
    setup(){

    }
}
</script>

<style scoped>


.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
}

img{
    width: 100%;
    height: 300px;
}
</style>
